// import { Button, Avatar } from "antd-mobile";
import { Route, Routes } from "react-router-dom";
import "./App.css";
import FootTab from "./components/foot-tab";
import Today from "./views/today";
import Explore from "./views/explore";
import Mine from "./views/mine";
import Test from "./views/test";
import Login from "./views/login";
import Main from "./views/main";
import RequireAuth from "./guard/RequireAuth";
import Detail from "./views/detail";

function App() {
  return (
    <>
      <Routes>
        <Route path="/" element={<Main />}>
          <Route path="/today" element={<Today />} />
          <Route path="/explore" element={<Explore />} />
          <Route
            path="/mine"
            element={
              <RequireAuth>
                <Mine />
              </RequireAuth>
            }
          />
        </Route>
        <Route path="/test" element={<Test />} />
        <Route path="/login" element={<Login />} />
        <Route path="/detail/:id" element={<Detail />} />
      </Routes>
    </>
  );
}

export default App;
